package com.bytz.modules.cms.user.model;

import com.baomidou.mybatisplus.annotation.TableLogic;
import com.bytz.common.aspect.annotation.Dict;
import com.bytz.common.entity.IFlowEntity;
import com.bytz.common.entity.annotation.MPJFieldMapping;
import com.bytz.modules.cms.order.entity.Order;
import com.bytz.modules.cms.user.entity.EcAudit;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonIncludeProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonUnwrapped;
import com.fasterxml.jackson.databind.annotation.JsonAppend;

import org.springframework.boot.jackson.JsonMixin;

import java.math.BigDecimal;
import java.time.LocalDateTime;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @program: cms-backend
 *
 * @description:
 *
 * @author: KyleWang
 *
 * @create: 2022-11-04 11:15
 **/
@Data
public class EcAuditModel implements IFlowEntity {

    @ApiModelProperty(value = "ecId")
    @MPJFieldMapping(entityClass = EcAudit.class)
    private String id;

    @ApiModelProperty(value = "经销商ID")
    @MPJFieldMapping(entityClass = Order.class)
    private String resellerId;

    @ApiModelProperty(value = "产品线Code")
    @MPJFieldMapping(entityClass = Order.class)
    private String productLineCode;

    @ApiModelProperty(value = "需方订单号")
    @MPJFieldMapping(entityClass = Order.class)
    private String orderNumber;

    @ApiModelProperty(value = "订单类别（1-标准订单；2-项目订单）")
    @Dict(dicCode = "mall_order_type")
    @MPJFieldMapping(entityClass = Order.class)
    private String orderType;

    @ApiModelProperty(value = "合同号")
    @MPJFieldMapping(entityClass = Order.class)
    private String contractNumber;

    @ApiModelProperty(value = "合同盖章前文件")
    @MPJFieldMapping(entityClass = Order.class)
    private String contractFile;

    @ApiModelProperty(value = "合同盖章后文件")
    @MPJFieldMapping(entityClass = Order.class)
    private String contractSignedFile;

    @ApiModelProperty(value = "项目名称")
    @MPJFieldMapping(entityClass = Order.class)
    private String projectName;

    @ApiModelProperty(value = "签约地点")
    @MPJFieldMapping(entityClass = Order.class)
    private String signedPlace;

    @ApiModelProperty(value = "币种")
    @MPJFieldMapping(entityClass = Order.class)
    private String currency;

    @ApiModelProperty(value = "增值税税率")
    @MPJFieldMapping(entityClass = Order.class)
    private BigDecimal taxRate;

    @ApiModelProperty(value = "需方用户id")
    @MPJFieldMapping(entityClass = Order.class)
    private String demanderId;

    @ApiModelProperty(value = "需方客户编码")
    @MPJFieldMapping(entityClass = Order.class)
    private String demanderNumber;

    @ApiModelProperty(value = "需方单位名称")
    @MPJFieldMapping(entityClass = Order.class)
    private String demanderName;

    @ApiModelProperty(value = "需方单位地址")
    @MPJFieldMapping(entityClass = Order.class)
    private String demanderAddress;

    @ApiModelProperty(value = "需方邮政编码")
    @MPJFieldMapping(entityClass = Order.class)
    private String demanderPostcode;

    @ApiModelProperty(value = "需方委托代理人")
    @MPJFieldMapping(entityClass = Order.class)
    private String demanderAgent;

    @ApiModelProperty(value = "需方电话")
    @MPJFieldMapping(entityClass = Order.class)
    private String demanderPhone;

    @ApiModelProperty(value = "需方传真")
    @MPJFieldMapping(entityClass = Order.class)
    private String demanderFax;

    @ApiModelProperty(value = "需方签约日期：订单提交日期")
    @MPJFieldMapping(entityClass = Order.class)
    private LocalDateTime demanderSignedDate;

    @ApiModelProperty(value = "供方单位名称")
    @MPJFieldMapping(entityClass = Order.class)
    private String supplierName;

    @ApiModelProperty(value = "供方单位地址")
    @MPJFieldMapping(entityClass = Order.class)
    private String supplierAddress;

    @ApiModelProperty(value = "供方邮政编码")
    @MPJFieldMapping(entityClass = Order.class)
    private String supplierPostcode;

    @ApiModelProperty(value = "销售人员ID")
    @MPJFieldMapping(entityClass = Order.class)
    private String salesId;

    @ApiModelProperty(value = "销售人员名字 (供方委托代理人)")
    @MPJFieldMapping(entityClass = Order.class)
    private String salesName;

    @ApiModelProperty(value = "供方电话")
    @MPJFieldMapping(entityClass = Order.class)
    private String supplierPhone;

    @ApiModelProperty(value = "供方传真")
    @MPJFieldMapping(entityClass = Order.class)
    private String supplierFax;

    @ApiModelProperty(value = "供方签约日期：订单审批完成日期")
    @MPJFieldMapping(entityClass = Order.class)
    private LocalDateTime supplierSignedDate;

    @ApiModelProperty(value = "需方交付用户id")
    @MPJFieldMapping(entityClass = Order.class)
    private String shipToId;

    @ApiModelProperty(value = "需方交付客户编码")
    @MPJFieldMapping(entityClass = Order.class)
    private String shipToNumber;

    @ApiModelProperty(value = "需方交付单位名称")
    @MPJFieldMapping(entityClass = Order.class)
    private String shipToName;

    @ApiModelProperty(value = "需方交付单位地址")
    @MPJFieldMapping(entityClass = Order.class)
    private String shipToAddress;

    @ApiModelProperty(value = "需方交付联系人")
    @MPJFieldMapping(entityClass = Order.class)
    private String shipToContact;

    @ApiModelProperty(value = "需方交付联系人电话")
    @MPJFieldMapping(entityClass = Order.class)
    private String shipToPhone;

    @ApiModelProperty(value = "终端用户id")
    @MPJFieldMapping(entityClass = Order.class)
    private String endUserId;

    @ApiModelProperty(value = "终端客户编码")
    @MPJFieldMapping(entityClass = Order.class)
    private String endUserNumber;

    @ApiModelProperty(value = "终端用户单位名称")
    @MPJFieldMapping(entityClass = Order.class)
    private String endUserName;

    @ApiModelProperty(value = "终端用户单位地址")
    @MPJFieldMapping(entityClass = Order.class)
    private String endUserAddress;

    @ApiModelProperty(value = "终端用户联系人")
    @MPJFieldMapping(entityClass = Order.class)
    private String endUserContact;

    @ApiModelProperty(value = "终端用户联系人电话")
    @MPJFieldMapping(entityClass = Order.class)
    private String endUserPhone;

    @ApiModelProperty(value = "EC审批材料")
    @MPJFieldMapping(entityClass = Order.class)
    private String ecAuditFile;

    @ApiModelProperty(value = "EC其他审批材料")
    @MPJFieldMapping(entityClass = Order.class)
    private String ecAuditOtherFile;

    @ApiModelProperty(value = "附件")
    @MPJFieldMapping(entityClass = Order.class)
    private String attachment;

    @ApiModelProperty(value = "付款方式")
    @MPJFieldMapping(entityClass = Order.class)
    private String payType;

    @ApiModelProperty(value = "质保期")
    @MPJFieldMapping(entityClass = Order.class)
    private String warrantyPeriod;

    @ApiModelProperty(value = "预付比例")
    @MPJFieldMapping(entityClass = Order.class)
    private BigDecimal prepayRatio;

    @ApiModelProperty(value = "到货情况")
    @MPJFieldMapping(entityClass = Order.class)
    private String arrivalStatus;

    @ApiModelProperty(value = "订单标准交期（取订单产品最长的交期）")
    @MPJFieldMapping(entityClass = Order.class)
    private Integer deliveryDate;

    @ApiModelProperty(value = "期望交付计划")
    @MPJFieldMapping(entityClass = Order.class)
    private String deliveryPlan;

    @ApiModelProperty(value = "订单总额")
    @MPJFieldMapping(entityClass = Order.class)
    private BigDecimal totalPrice;

    @ApiModelProperty(value = "实际支付金额")
    @MPJFieldMapping(entityClass = Order.class)
    private BigDecimal actualPayPrice;

    @ApiModelProperty(value = "已支付金额")
    @MPJFieldMapping(entityClass = Order.class)
    private BigDecimal paidPrice;

    @ApiModelProperty(value = "抵扣金额")
    @MPJFieldMapping(entityClass = Order.class)
    private BigDecimal deductionPrice;

    @ApiModelProperty(value = "优惠券id")
    @MPJFieldMapping(entityClass = Order.class)
    private String couponId;

    @Dict(dicCode = "mall_order_status")
    @ApiModelProperty(value = "订单状态（草稿；订单审核中；待盖章；待提交预付款；产品排产中；待提交尾款；已完成；已终止）")
    @MPJFieldMapping(entityClass = Order.class, propertyName = "status")
    private String orderStatus;

    @Dict(dicCode = "mall_order_ecRequired")
    @ApiModelProperty(value = "EC是否必填")
    @MPJFieldMapping(entityClass = Order.class)
    private String ecRequired;

    @ApiModelProperty(value = "EC驳回意见")
    @MPJFieldMapping(entityClass = Order.class)
    private String ecRejectOpinion;

    @ApiModelProperty(value = "备注")
    @MPJFieldMapping(entityClass = EcAudit.class)
    private String remark;

    @ApiModelProperty(value = "删除状态")
    @TableLogic
    @MPJFieldMapping(entityClass = EcAudit.class)
    private Integer delFlag;

    @ApiModelProperty(value = "创建人")
    @MPJFieldMapping(entityClass = EcAudit.class)
    private String createBy;

    @ApiModelProperty(value = "创建人姓名")
    @MPJFieldMapping(entityClass = EcAudit.class)
    private String createByName;

    @ApiModelProperty(value = "创建时间")
    @MPJFieldMapping(entityClass = EcAudit.class)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新人")
    @MPJFieldMapping(entityClass = EcAudit.class)
    private String updateBy;

    @ApiModelProperty(value = "更新人姓名")
    @MPJFieldMapping(entityClass = EcAudit.class)
    private String updateByName;

    @ApiModelProperty(value = "更新时间")
    @MPJFieldMapping(entityClass = EcAudit.class)
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "流程审批人")
    @MPJFieldMapping(entityClass = EcAudit.class)
    private String auditUsers;

    @ApiModelProperty(value = "下一节点处理人")
    @MPJFieldMapping(entityClass = EcAudit.class)
    private String nextAuditUsers;

    @ApiModelProperty(value = "流程实例Id")
    @MPJFieldMapping(entityClass = EcAudit.class)
    private String procInstId;

    @ApiModelProperty(value = "提交时间")
    @MPJFieldMapping(entityClass = EcAudit.class)
    private LocalDateTime submitTime;

    @ApiModelProperty(value = "完成时间")
    @MPJFieldMapping(entityClass = EcAudit.class)
    private LocalDateTime completeTime;

    @Dict(dicCode = "mall_order_ec_status")
    @MPJFieldMapping(entityClass = EcAudit.class)
    private String status;

    @ApiModelProperty(value = "订单ID")
    @MPJFieldMapping(entityClass = EcAudit.class)
    private String orderId;

    @ApiModelProperty("是否可审批")
    private Boolean canAudit;


}